<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<!-- 
	 
	 -->
	<div id="app">
		<h1 v-for="n in 2">{{ msg }}</h1>
		<hr>
		<ul>
			<!-- for in, for of -->
			<!-- <li v-for="item in items1" :key="item.message"> -->
			<!-- <li v-for="(item, index) in items1" :key="index"> -->
			<li v-for="(item, index) of items1" :key="index">
				{{ item.message }}
			</li>
		</ul>
		<hr>
		<ol>
			<!-- Object.values(article) -->
			<!-- Object.keys(article) -->
			<li v-for="(val, key) in article">
				{{ key }}, {{ val }}
			</li>
		</ol>
		<hr>
		<dl>
			<template v-for="(val, key) in article">
				<dt>key: {{ key }}</dt>
				<dd>{{ val }}</dd>
			</template>
		</dl>
	</div>
	
	<script src="vue.js"></script>
	<script>
		
		const app = new Vue({
			data: {
				msg: "Hello Vue: v-for！",
				items1: [
					{ message: 'Foo' },
					{ message: 'Bar' },
					{ message: 'Li' },
					{ message: 'Wang' },
				],
				article: {
					title: 'How to do lists in Vue',
					author: 'Jane Doe',
					publishedAt: '2016-04-10'
				}
			},
		}).$mount("#app")
	</script>
</body>
</html>